package net.heri.xmppchat.persistence;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(daoClass = MessageDataDao.class, tableName = "xmpp_message_data")
public class MessageData {
	
	@DatabaseField(columnName = "id", generatedId = true)
	private Long messageId;
	@DatabaseField(columnName = "body")
	private String body;
	@DatabaseField(columnName = "chat_session", canBeNull = false, foreign = true, foreignAutoRefresh = true)
	private ChatSession session;
	
	public MessageData() {
		
	}

	public Long getMessageId() {
		return messageId;
	}

	public void setMessageId(Long messageId) {
		this.messageId = messageId;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public ChatSession getSession() {
		return session;
	}

	public void setSession(ChatSession session) {
		this.session = session;
	}

}
